<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<layout:page>

<jsp:body>
	<h2>Listar Empréstimos e Reservas</h2>
	
	<h3>Empréstimos</h3>
			
	<table class="list">
		<tr>
			<th>Nome</th>
			<th>Tipo</th>
			<th>Data do Empréstimo</th>
			<th>Status</th>
			<th>Data da Devolução</th>
		</tr>
		<c:if test="${empty materialList}">
		<tr>
			<td colspan="5" class="no-item">Nenhum material encontrado.</td>
		</tr>
		</c:if>
		<c:forEach items="${materialList}">
			<tr>
				<td>Livro 1</td>
				<td>Livro</td>
				<td>ontem</td>
				<td>Em curso</td>
				<td>amanhã</td>
			</tr>
		</c:forEach>
	</table>

	<br/>

	<h3>Reservas</h3>
			
	<table class="list">
		<tr>
			<th>Nome</th>
			<th>Data da Solicitação</th>
		</tr>
		<c:if test="${empty reservationList}">
		<tr>
			<td colspan="2" class="no-item">Nenhuma reserva encontrada.</td>
		</tr>
		</c:if>
		<c:forEach items="${reservationList}">
			<tr>
				<td>Livro 1</td>
				<td>ante-ontem</td>
			</tr>
		</c:forEach>
	</table>

</jsp:body>   

</layout:page>